package net.xiduth.game.npc.combat.impl;

import net.xiduth.game.Animation;
import net.xiduth.game.Entity;
import net.xiduth.game.npc.NPC;
import net.xiduth.game.npc.combat.CombatScript;
import net.xiduth.game.npc.combat.NPCCombatDefinitions;
import net.xiduth.game.player.Player;

/**
 * 
 * @author Jae <jae@xiduth.com>
 * 
 * Last modified: <Oct 17, 2013>
 *
 */
public class WolverineCombat extends CombatScript {

	@Override
	public Object[] getKeys() {
		return new Object[] {15126};
	}

	@Override
	public int attack(final NPC npc, final Entity target) {
		final NPCCombatDefinitions defs = npc.getCombatDefinitions();
		@SuppressWarnings("unused")
		final Player player = (Player) target;
		npc.setNextAnimation(new Animation(10961));
		npc.setCapDamage(1000);
		int damage = getRandomMaxHit(npc, defs.getMaxHit(), NPCCombatDefinitions.MELEE, target);
		int dclaw1 = damage / 2;
		int dclaw2 = damage / 3;
		int dclaw3 = damage / 3;
		delayHit(npc, 2, target, getMagicHit(npc, damage));
		delayHit(npc, 2, target, getRangeHit(npc, dclaw1));
		delayHit(npc, 2, target, getMeleeHit(npc, dclaw2));
		delayHit(npc, 2, target, getMeleeHit(npc, dclaw3));
		return defs.getAttackDelay();
	}
}
